package controller

import (
	"gitee.com/kordar/layuiadmin/admin/util"
	"github.com/gin-gonic/gin"
	"github.com/kordar/gocfg"
)

type HomeController struct {
}

func NewHomeController() *HomeController {
	return &HomeController{}
}

func (controller *HomeController) Index(ctx *gin.Context) {
	cfg := gocfg.GetSection("goadmin.home")
	util.Render(ctx, "index.html", cfg)
}

func (controller *HomeController) NoFound(ctx *gin.Context) {
	util.Render(ctx, "404.html", map[string]string{})
}
